package beans;

import org.springframework.beans.factory.FactoryBean;

/**
 * @auther hewenhui
 * @see <a href="hetp://www.codingmaster.com> java </a>
 */

//Person对象的工厂实现FactoryBean接口
public class PersonFactoryBean implements FactoryBean<Person> {
    @Override
    public Person getObject() throws Exception {
        return new Person();
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    public boolean isSingleton() {
        //true:表示单例
        //false:表示原型
        return false;
    }
}
